package com.qiyu.tech.im.service.impl;

import com.qiyu.tech.im.dao.ChatDetailMapper;
import com.qiyu.tech.im.entity.ChatDetailRecord;
import com.qiyu.tech.im.service.ChatDetailService;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @Author linhao
 * @Date created in 3:57 下午 2021/4/13
 */
public class ChatDetailServiceImpl implements ChatDetailService {

    @Resource
    private ChatDetailMapper chatDetailMapper;

    /**
     * 分页查询 个人聊天记录
     *
     * @param memberId
     * @return
     */
    @Override
    public List<ChatDetailRecord> selectChatDetailList(long memberId) {
        Map<String,Object> map = new HashMap<>(2);
        map.put("memberId",memberId);
        map.put("validStatus",1);
        map.put("removeStatus",0);
        return chatDetailMapper.selectByMap(map);
    }


}
